Current printers and Multi-Function Peripherals (MFPs) are becoming increasingly photo capable.
In many cases, a printer or MFP should be capable of generating digital photo prints from various sources. Such sources of digital images may comprise, among others, (i) a host personal computer (PC); (ii) memory cards (e.g., SmartMedia, CompactFlash, etc.) which are removed from a digital camera and plugged into appropriate slots on the printer (or MFP); and/or (iii) the digital camera itself, using a technology which permits the images to be printed directly from the digital camera to the printer (or MFP), without having to connect the camera to a computer or remove a memory card from the camera (e.g., using the PictBridge™ technology standard).
In the latter two situations, it is generally required that the printer (or MFP) be capable of printing the images (typically photographs) without assistance from a host PC (e.g., such as where there is no host PC connected to the printer or MFP, or where a host PC is connected to the printer or MFP but the host PC is not powered up). In the printing industry, this capability is sometimes referred to as “standalone photo printing capability”.
While such standalone photo printing capability eliminates the need for an operational PC at the time of printing, it also poses several significant challenges for the manufacturer of the printer (or MFP). One of the more significant challenges of standalone photo printing relates to the printing of digital photos (i.e., images) with rotation.
More particularly, consider a typical setting in which the digital camera creates an image with a landscape orientation, but the printer (or MFP) is equipped with a paper feed mechanism which advances the paper with a portrait orientation. In this situation, in order for the printer (or MFP) to print the landscape image on a standard 4″×6″ sheet, 5″×7″ sheet, letter-sized (i.e., 8.5″×11″) sheet, etc., the image must be rotated 90 degrees in order to convert the image orientation from its camera orientation (i.e., landscape) to its printer orientation (i.e., portrait). However, such rotation is complicated by the fact that most cameras use a JPEG data compression algorithm when storing their image files, and the JPG compression algorithm has both “sequence” and “incremental state” aspects to it, such that it is quite difficult to rotate the image while the image is in its compressed (i.e., JPEG) format.
More particularly, with the JPEG compression algorithm (see FIG. 1), successive segments of the image are encoded in Minimum Coded Units (MCUs), starting at the top left-hand corner of the image and proceeding left-to-right, top-to-bottom (see FIG. 2). Thus, the MCUs in a compressed JPEG file can be considered to have a “sequence”. In addition, the JPEG encoding algorithm uses the state of the immediately-preceding MCU when encoding the current MCU (see FIG. 3). Thus, there is an “incremental state” associated with the encoding of each successive MCU.
The JPEG compression process results in the creation of a data file which comprises a header and successive MCU data blocks (see FIG. 4).
During decompression (see FIG. 5), the foregoing process is essentially reversed, i.e., the MCU in the top left-hand corner is decompressed first, and then each successive MCU is decompressed in order, using the state of the immediately-preceding MCU to effect decompression for the current MCU.
Thus, when an image needs to be rotated for printing (i.e., converted from the landscape orientation of the camera's JPEG data file to the portrait orientation of the printer's paper feed mechanism, see FIG. 6), it is not possible to simply decompress the MCUs in a sequence matching the orientation of the paper in the printer tray. In other words, it is not possible to simply decompress the MCUs in a sequence matching the order of the printing process, i.e., MCUA0, MCUB0, MCUC0, MCUD0, . . . , MCUZ0, MCUA1, MCUB1, MCUC1, MCUD1, . . . , MCUZ1. MCUA2, MCUB2, MCUC2, MCUD2, . . . , since this does not yield proper MCU decompression. Proper MCU decompression requires a left-to-right, top-to-bottom sequence, starting at the top left-hand corner of the image. Thus, proper MCU decompression requires the different sequence MCUA0, MCUA1, MCUA2, MCUA3, . . . , MCUAi, MCUB0, MCUB1, MCUB2, MCUB3, . . . , MCUBi, MCUC0, MCUC1, MCUC2, MCUC3, . . . .
As a result, when a digital image must be rotated for printing, it is generally first decompressed in its entirety, stored into a temporary buffer on the printer (and/or MFP), and then read out of the temporary buffer in the sequence required by the print process. Alternatively, the decompressed image can be rotated before it is stored into the temporary buffer, so that it is already in the sequence required by the printer. In either case, this approach is relatively straightforward; however, it suffers from two significant disadvantages.
First, this procedure requires that the temporary buffer be quite large, since it has to hold the entire decompressed image. However, as image resolutions increase, this can become prohibitively expensive. By way of example, an image from an 8 megapixel camera, which might occupy 3.5 megabytes in its compressed JPEG form, could require as much as 24 megabytes of memory in its decompressed form. Thus, the printer (or MFP) must provide significant amounts of additional memory for the temporary buffer, which increases the cost of the printer (or MFP). This is generally undesirable, given the thin profit margins of the printer (and MFP) markets. It is, of course, possible to avoid adding such additional memory by downscaling the image to the extent required to fit within the existing memory constraints, however, this downscaling process discards detail information, and thereby reduces image quality, which is generally undesirable.
The “simple” rotation scheme described above (i.e., full decompression, storage, rotation and printing; or full decompression, rotation, storage and printing) has another significant disadvantage associated with it. More particularly, with this approach, the image must be fully decompressed before printing can begin. Depending on the speed of the decompression engine, this may cause a significant delay between the time that the user issues the print command to the time the printer (or MFP) begins laying down ink on the paper.
Therefore, there is a need for a new and improved system (method and apparatus) for printing digital images with rotation which reduces system memory requirements, avoids reductions in image quality and minimizes printing delays.